]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Get resource scale by get_resource_scale
authorXiaoguang Wang <xwang@suse.com>
Tue, 21 Apr 2020 08:17:09 +0000 (16:17 +0800)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 21 Apr 2020 11:48:56 +0000 (13:48 +0200)
To shut up 'Getting invalid resource scale property' warnings in the log.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1206

js/gdm/loginDialog.js

index 16a7536cef21dd214a9d434d167bbe62a3c43348..0ee51e637137c8a5421860b2f6d2916ca8ce84be 100644 (file)
@@ -810,12 +810,13 @@ var LoginDialog = GObject.registerClass({
             return;
 
         this._logoBin.destroy_all_children();
-        if (this._logoFile && this._logoBin.resource_scale > 0) {
+        const [valid, resourceScale] = this._logoBin.get_resource_scale();
+        if (this._logoFile && valid) {
             let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
             this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
                                                                        -1, -1,
                                                                        scaleFactor,
-                                                                       this._logoBin.resource_scale));
+                                                                       resourceScale));
         }
     }